program Chromium.Browser.Win32;

{$DEFINE CEF_BROWSER}

uses
  System.ShareMem,
  Vcl.Forms,
  System.SysUtils,
  Chromium4D.Classes in '..\..\internal\commom\Chromium4D.Classes.pas',
  Chromium4D.Core in '..\..\internal\commom\Chromium4D.Core.pas',
  Chromium4D.Lib in '..\..\internal\Chromium4D.Lib.pas',
  Chromium4D in '..\..\runtime\Chromium4D.pas',
  Chromium4D.Browser in '..\..\internal\browser\Chromium4D.Browser.pas',
  Chromium4D.Browser.Process in '..\..\internal\browser\Chromium4D.Browser.Process.pas',
  Chromium4D.Browser.MessageRouter in '..\..\internal\browser\Chromium4D.Browser.MessageRouter.pas',
  Chromium4D.Utils in '..\..\internal\commom\Chromium4D.Utils.pas',
  Chromium4D.Browser.MessageHandler in '..\..\internal\browser\Chromium4D.Browser.MessageHandler.pas',
  Chromium4D.Native.Win32 in '..\..\internal\browser\native\Chromium4D.Native.Win32.pas',
  Chromium4D.LocalFileSystemScheme in '..\..\internal\scheme\Chromium4D.LocalFileSystemScheme.pas',
  Chromium4D.Filter in '..\..\internal\filter\Chromium4D.Filter.pas',
  Chromium4D.InvokeScheme in '..\..\internal\scheme\Chromium4D.InvokeScheme.pas',
  Chromium4D.Native.Async in '..\..\internal\browser\native\Chromium4D.Native.Async.pas',
  Chromium4D.Browser.UrlRouter in '..\..\internal\browser\Chromium4D.Browser.UrlRouter.pas',
  Chromium4D.Browser.Service in '..\..\internal\browser\Chromium4D.Browser.Service.pas',
  SampleMainFrm in 'SampleMainFrm.pas' {frmSampleMain},
  Chromium4D.Types in '..\..\internal\commom\Chromium4D.Types.pas',
  Chromium4D.Win in '..\..\internal\browser\container\Chromium4D.Win.pas',
  Chromium4D.Native.EventEmitter in '..\..\internal\browser\native\Chromium4D.Native.EventEmitter.pas',
  ChromiumMainFrm in 'ChromiumMainFrm.pas' {frmmkChromium},
  Utils in 'Utils.pas';

{$R *.res}

begin
  ReportMemoryLeaksOnShutdown := {$IFDEF DEBUG} True {$ELSE} False {$ENDIF};

  Logger.Trace('Chromium.Browser.Win32 Enter');

  IsMultiThread := True;

  if TSyChromiumLib.InitChromium('') then
  begin
    Application.Initialize;
    Application.MainFormOnTaskbar := True;
    Application.CreateForm(TfrmSampleMain, frmSampleMain);
  Application.Run;
  end;

  TSyChromiumLib.UninitChromium;
  //TerminateProcess(OpenProcess(PROCESS_TERMINATE, False, GetCurrentProcessID), $FFFFFFFF);

  Logger.Trace('Chromium.Browser.Win32 Leave');
end.
